import React, { Component } from 'react';
import { SearchOutlined } from '@ant-design/icons';
import '../../scss/Top.scss';
import { withRouter } from "react-router-dom";


class Top extends Component {
    render() {
        return (
            <>
            <div className="topwww">
                    <div className="top_top">
                        <h1>cdF    会员购</h1>
                        <span>足&nbsp;不&nbsp;出&nbsp;户 &nbsp;&nbsp; 尊&nbsp;享&nbsp;全&nbsp;球&nbsp;奢&nbsp;品</span>
                    </div>
                    
                    <div className="top_bottm">
                        <i><SearchOutlined /></i>
                        <input onClick={ this.search } type="text" placeholder='搜索商品' />
                        <span>搜索</span>
                    </div>
            </div>
            </>
        );
    }
    
    search = () => {
        this.props.history.push({ pathname:'/search' });
    }

}

export default withRouter(Top);